package com.stars.empoly.vmodel

import android.app.Application
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.stars.empoly.model.Agreement
import com.stars.empoly.model.ArticleInfo
import com.stars.empoly.model.MsgGet
import com.stars.empoly.utils.net.NetEngine
import com.trailer.base.base.BRepository
import com.trailer.base.base.BViewModel
import kotlinx.coroutines.launch

class ArticleDetailVModel(application: Application) : BViewModel<BRepository>(application) {


    var bean: MutableLiveData<Agreement> = MutableLiveData()



    fun getInfo() {


        viewModelScope.launch {

           var it= repository().preq {NetEngine.service.agreementList()}
            if (it.ok()) {
                bean.value=it.data()

            }

        }


    }




}
